from tools import get_llm
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate

llm = get_llm()

promptsTemplate = ChatPromptTemplate(
    [
        ('human', '{content}'),
        ('system', '你是一个优秀的翻译官，需要将用户的信息翻译为{language}')
    ]
)

output_parser = StrOutputParser()

chain = promptsTemplate | llm | output_parser

result = chain.invoke({'content': '你叫什么名字', 'language': '英文'})
print(result)
